{% load static %}<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>{% block title %}Django Boards{% endblock %}</title>
        <link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
        <link rel="stylesheet" href="{% static 'css/app.css' %}">
        {% block stylesheet %}{% endblock %}  <!-- 留给特定页面添加CSS样式 -->
    </head>
    <body>
        {% block body %}  <!-- 特定页面的内容不同 -->
            <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
                <div class="container">
                    <a class="navbar-brand" href="{% url 'home' %}">Django Boards</a>
                    <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#mainMenu" aria-controls="mainMenu" aria-expanded="false" aria-label="Toggle navigation">
                        <span class="navbar-toggler-icon"></span>
                    </button>
                    <div class="collapse navbar-collapse" id="mainMenu">
                        <ul class="navbar-nav ml-auto">
                            <li class="nav-item">
                            <a class="nav-link" href="#">{{ user.username }}</a>
                            </li>
                        </ul>
                    </div>
                </div>
            </nav>

            <div class="container">
                <ol class="breadcrumb my-4">
                    {% block breadcrumb %}
                    {% endblock %}
                </ol>
                {% block content %}
                {% endblock %}
            </div>
        {% endblock body %}
    </body>
</html>